<template>
	<view class="list">
		<view class="chileList" v-for="(item,index) in tracks" :key="item.id" @click="jump(item.id)">
			<span>{{index >= 9 ? index + 1 : '0' + (index + 1)}}</span>
			<view class="neirong">
				<view class="title2">{{item.name}}</view>
				<view class="name">{{item.ar[0].name}} - {{item.al.name}}</view>
			</view>
			<view class="pic">
				<image src="../../static/zhanting.png"></image>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		props:['tracks'],
		methods:{
			jump(id){
				this.$emit('jump',id)
			}
		}
	}
</script>

<style lang="scss">
	.list{
		width: 100%;
		margin-bottom: 20rpx;
		.chileList{
			width: 100%;
			//height: 70px;
			//background: yellow;
			display: flex;
			align-items: center;
			span{
				color: #df3436;
				margin-left: 20rpx;
				font-weight: 500;
				font-size: 40rpx;
			}
			.neirong{
				height: 100%;
				width: 70%;
				//background-color: hotpink;
				margin-left: 20rpx;
				.title2{
					font-size: 34rpx;
					margin-top: 10rpx;
					overflow: hidden;
					text-overflow: ellipsis;//添加省略号
					white-space: nowrap;//不进行换行
					word-break: normal;    
				}
				.name{
					font-size: 24rpx;
					color: #888;
					margin-top: 10rpx;
				}
			}
			.pic{
				margin-left: 50rpx;
				image{
					width: 44rpx;
					height: 44rpx;
				}
			}
		}
	}
</style>
